//package com.eastfair.auth.rocket;
//
//import com.alibaba.fastjson.JSON;
//import com.alibaba.fastjson.JSONObject;
//import com.alibaba.fastjson.TypeReference;
//import com.eastfair.auth.dto.UserAccountDto;
//import com.eastfair.auth.entity.UserAccount;
//import com.eastfair.auth.service.OrganizationService;
//import com.eastfair.auth.service.UserAccountService;
//import com.eastfair.cache.repository.CachePlusOps;
//import com.eastfair.core.context.ContextUtil;
//import com.eastfair.core.exception.BizException;
//import com.eastfair.core.point.BusinBasePoint;
//import com.eastfair.mq.model.MySimpleMessage;
//import com.eastfair.mq.service.AbstractPointService;
//import com.eastfair.mq.service.BusinessPointService;
//import com.eastfair.point.PointKeyDefinition;
//import com.eastfair.point.business.auth.BusinLoadUserPermissOfOrgPoint;
//import com.eastfair.point.business.auth.BusinLoadUserPermissOfRolePoint;
//import com.eastfair.point.business.auth.BusinLoadUserPermissPoint;
//import com.eastfair.point.business.auth.BusinUpdUserPoint;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.BeanUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//
///**
// * <p>
// * 单业务处理事件
// * </p>
// *
// * @author ligang
// * @date 2021-08-10
// */
//@Slf4j
//@Service
//public class BusinessPointServiceImpl extends AbstractPointService implements BusinessPointService {
//    @Autowired
//    private CachePlusOps cachePlusOps;
//
//    @Autowired
//    private OrganizationService organizationService;
//
//    @Autowired
//    UserAccountService userAccountService;
//
//    @Override
//    public void executeBusin(MySimpleMessage mySimpleMessage) {
////        log.info("BusinessPointServiceImpl is execute message is " + JSONObject.toJSONString(mySimpleMessage));
////        log.info("" + ContextUtil.getProjectId());
////        log.info("" + ContextUtil.getUserId());
//        BusinBasePoint businBasePoint = JSONObject.parseObject(JSONObject.toJSONString(mySimpleMessage.getPayload()), BusinBasePoint.class);
//        JSONObject jsonObject = (JSONObject) businBasePoint.getPointObj();
//        String businPointName = jsonObject.getString("pointName");
//        if (businPointName.equals(PointKeyDefinition.UPD_USER_DETAIL)) {
//            //用户锁定
//            BusinUpdUserPoint businUpdUserPoint = JSON.parseObject(businBasePoint.getPointObj().toString(),BusinUpdUserPoint.class);
//            UserAccount userAccount = new UserAccount();
//            BeanUtils.copyProperties(businUpdUserPoint, userAccount);
//            userAccount.setId(businUpdUserPoint.getUserId());
//            userAccountService.updateById(userAccount);
//        }
//    }
//}
